<%--
  Created by IntelliJ IDEA.
  User: zjd
  Date: 2020/8/21
  Time: 14:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false);
    function hideURLbar(){ window.scrollTo(0,1); } </script>
    <link href="${pageContext.request.contextPath}/front-style/css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
    <!-- pop-up -->
    <link href="${pageContext.request.contextPath}/front-style/css/popuo-box.css" rel="stylesheet" type="text/css" media="all" />
    <!-- //pop-up -->
    <link href="${pageContext.request.contextPath}/front-style/css/easy-responsive-tabs.css" rel='stylesheet' type='text/css'/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/front-style/css/zoomslider.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/front-style/css/style.css" />
    <link href="${pageContext.request.contextPath}/front-style/css/font-awesome.css" rel="stylesheet">
    <script type="text/javascript" src="${pageContext.request.contextPath}/front-style/js/modernizr-2.6.2.min.js"></script>
    <!--/web-fonts-->
    <link href='http://fonts.googleapis.com/css?family=Tangerine:400,700' rel='stylesheet' type='text/css'>
    <link href="http://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900" rel="stylesheet">
    <link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
    <script src="${pageContext.request.contextPath}/front-style/js/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/front-style/js/jquery.zoomslider.min.js"></script>
</head>
<body>
<div>
    <div class="modal-dialog">
        <!-- Modal content-->
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4>注册</h4>
                <div class="login-form">
                    <form action="${pageContext.request.contextPath}/admin/register" method="post" id="re-from">
                        <input type="text" name="admin_acount" id="admin_acount" placeholder="账号" required="">
                        <input type="password" name="admin_password"  id="admin_password" placeholder="密码" required="">
                        <input type="password" name="conform_password" placeholder="确认密码" required="">
                        <div class="tp">
                            <input type="submit" value="立即注册">
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/lib/jquery.js"></script>
<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/jquery.validate.min.js"></script>
<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/localization/messages_zh.js"></script>
<script>
    $.validator.setDefaults({
        submitHandler: function() {
            return true;
        }
    });
    $().ready(function() {
// 在键盘按下并释放及提交后验证提交表单
        $("#re-from").validate({
            rules: {
                admin_acount: {
                    required: true,
                    minlength: 2
                },
                admin_password: {
                    required: true,
                    minlength: 5
                },
                conform_password: {
                    required: true,
                    minlength: 5,
                    equalTo: "#admin_password"
                }
            },
            messages: {
                admin_acount: {
                    required: "请输入用户名",
                    minlength: "用户名必需由两个字母组成"
                },
                admin_password: {
                    required: "请输入密码",
                    minlength: "密码长度不能小于 5 个字母"
                },
                conform_password: {
                    required: "请输入密码",
                    minlength: "密码长度不能小于 5 个字母",
                    equalTo: "两次密码输入不一致"
                }
            }
        });
    });
</script>
<style>
    .error{
        color:red;
    }
</style>
</html>
